package com.sangmo.fts.process.storage.service;

import com.sangmo.boot.framework.plugin.dataview.crud.service.BaseViewService;
import com.sangmo.boot.framework.plugin.dataview.data.IDataViewRepo;
import com.sangmo.fts.process.storage.model.CsfStock;
import com.sangmo.fts.process.storage.model.CsfStockItem;
import com.sangmo.fts.process.storage.repo.CsfStockItemRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CsfStockItemEntityService extends BaseViewService<CsfStockItem> {

    @Autowired
    private CsfStockItemRepo csfStockItemRepo;

    @Override
    protected IDataViewRepo<CsfStockItem> getRepo() {
        return csfStockItemRepo;
    }

    public List<CsfStockItem> saveAll(List<CsfStockItem> stockItems) {
        return csfStockItemRepo.saveAll(stockItems);
    }
}
